.class public Lcom/noshufou/android/su/util/Util;
.super Ljava/lang/Object;
.source "Util.java"


# static fields
.field public static final MALICIOUS_NOT:I = 0x0

.field public static final MALICIOUS_PROVIDER_WRITE:I = 0x3

.field public static final MALICIOUS_RESPOND:I = 0x2

.field public static final MALICIOUS_UID:I = 0x1

.field private static final TAG:Ljava/lang/String; = "Su.Util"

.field private static final sSystemUids:Ljava/util/HashMap;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/HashMap",
            "<",
            "Ljava/lang/Integer;",
            "Ljava/lang/String;",
            ">;"
        }
    .end annotation
.end field


# direct methods
.method static constructor <clinit>()V
    .locals 3

    .prologue
    .line 62
    new-instance v0, Ljava/util/HashMap;

    invoke-direct {v0}, Ljava/util/HashMap;-><init>()V

    sput-object v0, Lcom/noshufou/android/su/util/Util;->sSystemUids:Ljava/util/HashMap;

    .line 64
    sget-object v0, Lcom/noshufou/android/su/util/Util;->sSystemUids:Ljava/util/HashMap;

    const/4 v1, 0x0

    invoke-static {v1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v1

    const-string v2, "root"

    invoke-virtual {v0, v1, v2}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 65
    sget-object v0, Lcom/noshufou/android/su/util/Util;->sSystemUids:Ljava/util/HashMap;

    const/16 v1, 0x3e8

    invoke-static {v1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v1

    const-string v2, "system"

    invoke-virtual {v0, v1, v2}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 66
    sget-object v0, Lcom/noshufou/android/su/util/Util;->sSystemUids:Ljava/util/HashMap;

    const/16 v1, 0x3e9

    invoke-static {v1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v1

    const-string v2, "radio"

    invoke-virtual {v0, v1, v2}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 67
    sget-object v0, Lcom/noshufou/android/su/util/Util;->sSystemUids:Ljava/util/HashMap;

    const/16 v1, 0x3ea

    invoke-static {v1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v1

    const-string v2, "bluetooth"

    invoke-virtual {v0, v1, v2}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 68
    sget-object v0, Lcom/noshufou/android/su/util/Util;->sSystemUids:Ljava/util/HashMap;

    const/16 v1, 0x3eb

    invoke-static {v1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v1

    const-string v2, "graphics"

    invoke-virtual {v0, v1, v2}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 69
    sget-object v0, Lcom/noshufou/android/su/util/Util;->sSystemUids:Ljava/util/HashMap;

    const/16 v1, 0x3ec

    invoke-static {v1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v1

    const-string v2, "input"

    invoke-virtual {v0, v1, v2}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 70
    sget-object v0, Lcom/noshufou/android/su/util/Util;->sSystemUids:Ljava/util/HashMap;

    const/16 v1, 0x3ed

    invoke-static {v1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v1

    const-string v2, "audio"

    invoke-virtual {v0, v1, v2}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 71
    sget-object v0, Lcom/noshufou/android/su/util/Util;->sSystemUids:Ljava/util/HashMap;

    const/16 v1, 0x3ee

    invoke-static {v1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v1

    const-string v2, "camera"

    invoke-virtual {v0, v1, v2}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 72
    sget-object v0, Lcom/noshufou/android/su/util/Util;->sSystemUids:Ljava/util/HashMap;

    const/16 v1, 0x3ef

    invoke-static {v1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v1

    const-string v2, "log"

    invoke-virtual {v0, v1, v2}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 73
    sget-object v0, Lcom/noshufou/android/su/util/Util;->sSystemUids:Ljava/util/HashMap;

    const/16 v1, 0x3f0

    invoke-static {v1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v1

    const-string v2, "compass"

    invoke-virtual {v0, v1, v2}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 74
    sget-object v0, Lcom/noshufou/android/su/util/Util;->sSystemUids:Ljava/util/HashMap;

    const/16 v1, 0x3f1

    invoke-static {v1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v1

    const-string v2, "mount"

    invoke-virtual {v0, v1, v2}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 75
    sget-object v0, Lcom/noshufou/android/su/util/Util;->sSystemUids:Ljava/util/HashMap;

    const/16 v1, 0x3f2

    invoke-static {v1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v1

    const-string v2, "wifi"

    invoke-virtual {v0, v1, v2}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 76
    sget-object v0, Lcom/noshufou/android/su/util/Util;->sSystemUids:Ljava/util/HashMap;

    const/16 v1, 0x3f3

    invoke-static {v1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v1

    const-string v2, "adb"

    invoke-virtual {v0, v1, v2}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 77
    sget-object v0, Lcom/noshufou/android/su/util/Util;->sSystemUids:Ljava/util/HashMap;

    const/16 v1, 0x3f4

    invoke-static {v1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v1

    const-string v2, "install"

    invoke-virtual {v0, v1, v2}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 78
    sget-object v0, Lcom/noshufou/android/su/util/Util;->sSystemUids:Ljava/util/HashMap;

    const/16 v1, 0x3f5

    invoke-static {v1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v1

    const-string v2, "media"

    invoke-virtual {v0, v1, v2}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 79
    sget-object v0, Lcom/noshufou/android/su/util/Util;->sSystemUids:Ljava/util/HashMap;

    const/16 v1, 0x3f6

    invoke-static {v1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v1

    const-string v2, "dhcp"

    invoke-virtual {v0, v1, v2}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 80
    sget-object v0, Lcom/noshufou/android/su/util/Util;->sSystemUids:Ljava/util/HashMap;

    const/16 v1, 0x3f7

    invoke-static {v1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v1

    const-string v2, "sdcard_rw"

    invoke-virtual {v0, v1, v2}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 81
    sget-object v0, Lcom/noshufou/android/su/util/Util;->sSystemUids:Ljava/util/HashMap;

    const/16 v1, 0x3f8

    invoke-static {v1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v1

    const-string v2, "vpn"

    invoke-virtual {v0, v1, v2}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 82
    sget-object v0, Lcom/noshufou/android/su/util/Util;->sSystemUids:Ljava/util/HashMap;

    const/16 v1, 0x3f9

    invoke-static {v1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v1

    const-string v2, "keystore"

    invoke-virtual {v0, v1, v2}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 83
    sget-object v0, Lcom/noshufou/android/su/util/Util;->sSystemUids:Ljava/util/HashMap;

    const/16 v1, 0x3fa

    invoke-static {v1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v1

    const-string v2, "usb"

    invoke-virtual {v0, v1, v2}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 84
    sget-object v0, Lcom/noshufou/android/su/util/Util;->sSystemUids:Ljava/util/HashMap;

    const/16 v1, 0x3fd

    invoke-static {v1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v1

    const-string v2, "gps"

    invoke-virtual {v0, v1, v2}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 85
    sget-object v0, Lcom/noshufou/android/su/util/Util;->sSystemUids:Ljava/util/HashMap;

    const/16 v1, 0x401

    invoke-static {v1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v1

    const-string v2, "nfc"

    invoke-virtual {v0, v1, v2}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 86
    sget-object v0, Lcom/noshufou/android/su/util/Util;->sSystemUids:Ljava/util/HashMap;

    const/16 v1, 0x7d0

    invoke-static {v1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v1

    const-string v2, "shell"

    invoke-virtual {v0, v1, v2}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 87
    sget-object v0, Lcom/noshufou/android/su/util/Util;->sSystemUids:Ljava/util/HashMap;

    const/16 v1, 0x7d1

    invoke-static {v1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v1

    const-string v2, "cache"

    invoke-virtual {v0, v1, v2}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 88
    sget-object v0, Lcom/noshufou/android/su/util/Util;->sSystemUids:Ljava/util/HashMap;

    const/16 v1, 0x7d2

    invoke-static {v1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v1

    const-string v2, "diag"

    invoke-virtual {v0, v1, v2}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 89
    sget-object v0, Lcom/noshufou/android/su/util/Util;->sSystemUids:Ljava/util/HashMap;

    const/16 v1, 0xbb9

    invoke-static {v1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v1

    const-string v2, "net_bt_admin"

    invoke-virtual {v0, v1, v2}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 90
    sget-object v0, Lcom/noshufou/android/su/util/Util;->sSystemUids:Ljava/util/HashMap;

    const/16 v1, 0xbba

    invoke-static {v1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v1

    const-string v2, "net_bt"

    invoke-virtual {v0, v1, v2}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 91
    sget-object v0, Lcom/noshufou/android/su/util/Util;->sSystemUids:Ljava/util/HashMap;

    const/16 v1, 0xbbb

    invoke-static {v1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v1

    const-string v2, "inet"

    invoke-virtual {v0, v1, v2}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 92
    sget-object v0, Lcom/noshufou/android/su/util/Util;->sSystemUids:Ljava/util/HashMap;

    const/16 v1, 0xbbc

    invoke-static {v1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v1

    const-string v2, "net_raw"

    invoke-virtual {v0, v1, v2}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 93
    sget-object v0, Lcom/noshufou/android/su/util/Util;->sSystemUids:Ljava/util/HashMap;

    const/16 v1, 0xbbd

    invoke-static {v1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v1

    const-string v2, "net_admin"

    invoke-virtual {v0, v1, v2}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 94
    sget-object v0, Lcom/noshufou/android/su/util/Util;->sSystemUids:Ljava/util/HashMap;

    const/16 v1, 0x270e

    invoke-static {v1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v1

    const-string v2, "misc"

    invoke-virtual {v0, v1, v2}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 95
    sget-object v0, Lcom/noshufou/android/su/util/Util;->sSystemUids:Ljava/util/HashMap;

    const/16 v1, 0x270f

    invoke-static {v1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v1

    const-string v2, "nobody"

    invoke-virtual {v0, v1, v2}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 54
    return-void
.end method

.method public constructor <init>()V
    .locals 0

    .prologue
    .line 54
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method

.method public static checkPin(Landroid/content/Context;Ljava/lang/String;)Z
    .locals 4
    .parameter "context"
    .parameter "pin"

    .prologue
    .line 434
    invoke-static {p0}, Landroid/preference/PreferenceManager;->getDefaultSharedPreferences(Landroid/content/Context;)Landroid/content/SharedPreferences;

    move-result-object v0

    .line 435
    .local v0, prefs:Landroid/content/SharedPreferences;
    const-string v2, "pin"

    const-string v3, ""

    invoke-interface {v0, v2, v3}, Landroid/content/SharedPreferences;->getString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v1

    .line 436
    .local v1, setPin:Ljava/lang/String;
    invoke-static {p1}, Lcom/noshufou/android/su/util/Util;->getHash(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v2, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v2

    return v2
.end method

.method public static elitePresent(Landroid/content/Context;ZI)Z
    .locals 8
    .parameter "context"
    .parameter "versionCheck"
    .parameter "minVersion"

    .prologue
    const/4 v5, 0x1

    const/4 v4, 0x0

    .line 383
    invoke-virtual {p0}, Landroid/content/Context;->getPackageManager()Landroid/content/pm/PackageManager;

    move-result-object v2

    .line 384
    .local v2, pm:Landroid/content/pm/PackageManager;
    const-string v6, "com.noshufou.android.su"

    const-string v7, "com.noshufou.android.su.elite"

    invoke-virtual {v2, v6, v7}, Landroid/content/pm/PackageManager;->checkSignatures(Ljava/lang/String;Ljava/lang/String;)I

    move-result v3

    .line 385
    .local v3, sigs:I
    if-eqz v3, :cond_1

    .line 401
    :cond_0
    :goto_0
    return v4

    .line 388
    :cond_1
    if-eqz p1, :cond_2

    .line 391
    :try_start_0
    const-string v6, "com.noshufou.android.su.elite"

    const/4 v7, 0x0

    invoke-virtual {v2, v6, v7}, Landroid/content/pm/PackageManager;->getPackageInfo(Ljava/lang/String;I)Landroid/content/pm/PackageInfo;

    move-result-object v1

    .line 392
    .local v1, pi:Landroid/content/pm/PackageInfo;
    iget v6, v1, Landroid/content/pm/PackageInfo;->versionCode:I
    :try_end_0
    .catch Landroid/content/pm/PackageManager$NameNotFoundException; {:try_start_0 .. :try_end_0} :catch_0

    if-lt v6, p2, :cond_0

    move v4, v5

    .line 393
    goto :goto_0

    .line 397
    .end local v1           #pi:Landroid/content/pm/PackageInfo;
    :catch_0
    move-exception v0

    .line 398
    .local v0, e:Landroid/content/pm/PackageManager$NameNotFoundException;
    goto :goto_0

    .end local v0           #e:Landroid/content/pm/PackageManager$NameNotFoundException;
    :cond_2
    move v4, v5

    .line 401
    goto :goto_0
.end method

.method public static findMaliciousPackages(Landroid/content/Context;)Ljava/util/List;
    .locals 7
    .parameter "context"
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Landroid/content/Context;",
            ")",
            "Ljava/util/List",
            "<",
            "Ljava/lang/String;",
            ">;"
        }
    .end annotation

    .prologue
    .line 449
    new-instance v1, Ljava/util/ArrayList;

    invoke-direct {v1}, Ljava/util/ArrayList;-><init>()V

    .line 450
    .local v1, maliciousApps:Ljava/util/List;,"Ljava/util/List<Ljava/lang/String;>;"
    invoke-virtual {p0}, Landroid/content/Context;->getPackageManager()Landroid/content/pm/PackageManager;

    move-result-object v4

    .line 451
    const/16 v5, 0x1000

    invoke-virtual {v4, v5}, Landroid/content/pm/PackageManager;->getInstalledPackages(I)Ljava/util/List;

    move-result-object v0

    .line 453
    .local v0, installedApps:Ljava/util/List;,"Ljava/util/List<Landroid/content/pm/PackageInfo;>;"
    invoke-interface {v0}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object v4

    :cond_0
    :goto_0
    invoke-interface {v4}, Ljava/util/Iterator;->hasNext()Z

    move-result v5

    if-nez v5, :cond_1

    .line 459
    return-object v1

    .line 453
    :cond_1
    invoke-interface {v4}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Landroid/content/pm/PackageInfo;

    .line 454
    .local v2, pkg:Landroid/content/pm/PackageInfo;
    invoke-static {p0, v2}, Lcom/noshufou/android/su/util/Util;->isPackageMalicious(Landroid/content/Context;Landroid/content/pm/PackageInfo;)I

    move-result v3

    .line 455
    .local v3, result:I
    if-eqz v3, :cond_0

    .line 456
    new-instance v5, Ljava/lang/StringBuilder;

    iget-object v6, v2, Landroid/content/pm/PackageInfo;->packageName:Ljava/lang/String;

    invoke-static {v6}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v6

    invoke-direct {v5, v6}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v6, ":"

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {v5, v3}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v5

    invoke-interface {v1, v5}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    goto :goto_0
.end method

.method public static formatDate(Landroid/content/Context;J)Ljava/lang/String;
    .locals 4
    .parameter "context"
    .parameter "date"

    .prologue
    .line 343
    invoke-static {p0}, Landroid/preference/PreferenceManager;->getDefaultSharedPreferences(Landroid/content/Context;)Landroid/content/SharedPreferences;

    move-result-object v1

    .line 344
    .local v1, prefs:Landroid/content/SharedPreferences;
    const-string v2, "pref_date_format"

    const-string v3, "default"

    invoke-interface {v1, v2, v3}, Landroid/content/SharedPreferences;->getString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    .line 345
    .local v0, format:Ljava/lang/String;
    const-string v2, "default"

    invoke-virtual {v0, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v2

    if-eqz v2, :cond_0

    .line 346
    invoke-static {p0}, Landroid/text/format/DateFormat;->getDateFormat(Landroid/content/Context;)Ljava/text/DateFormat;

    move-result-object v2

    invoke-static {p1, p2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;

    move-result-object v3

    invoke-virtual {v2, v3}, Ljava/text/DateFormat;->format(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v2

    .line 348
    :goto_0
    return-object v2

    :cond_0
    invoke-static {v0, p1, p2}, Landroid/text/format/DateFormat;->format(Ljava/lang/CharSequence;J)Ljava/lang/CharSequence;

    move-result-object v2

    check-cast v2, Ljava/lang/String;

    goto :goto_0
.end method

.method public static formatDateTime(Landroid/content/Context;J)Ljava/lang/String;
    .locals 2
    .parameter "context"
    .parameter "date"

    .prologue
    .line 379
    new-instance v0, Ljava/lang/StringBuilder;

    invoke-static {p0, p1, p2}, Lcom/noshufou/android/su/util/Util;->formatDate(Landroid/content/Context;J)Ljava/lang/String;

    move-result-object v1

    invoke-static {v1}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v1

    invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v1, " "

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-static {p0, p1, p2}, Lcom/noshufou/android/su/util/Util;->formatTime(Landroid/content/Context;J)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method public static formatTime(Landroid/content/Context;J)Ljava/lang/String;
    .locals 12
    .parameter "context"
    .parameter "time"

    .prologue
    const/4 v11, 0x1

    const/4 v10, 0x0

    .line 353
    invoke-static {p0}, Landroid/preference/PreferenceManager;->getDefaultSharedPreferences(Landroid/content/Context;)Landroid/content/SharedPreferences;

    move-result-object v5

    .line 354
    .local v5, prefs:Landroid/content/SharedPreferences;
    const-string v8, "pref_24_hour_format"

    invoke-interface {v5, v8, v11}, Landroid/content/SharedPreferences;->getBoolean(Ljava/lang/String;Z)Z

    move-result v2

    .line 355
    .local v2, hour24:Z
    const-string v8, "pref_show_seconds"

    invoke-interface {v5, v8, v10}, Landroid/content/SharedPreferences;->getBoolean(Ljava/lang/String;Z)Z

    move-result v7

    .line 356
    .local v7, showSeconds:Z
    const-string v1, "kk"

    .line 357
    .local v1, hour:Ljava/lang/String;
    const-string v3, "mm"

    .line 358
    .local v3, min:Ljava/lang/String;
    const-string v6, ":ss"

    .line 359
    .local v6, sec:Ljava/lang/String;
    const-string v4, ""

    .line 361
    .local v4, post:Ljava/lang/String;
    if-eqz v2, :cond_0

    .line 362
    const-string v1, "kk"

    .line 368
    :goto_0
    if-eqz v7, :cond_1

    .line 369
    const-string v6, ":ss"

    .line 374
    :goto_1
    const-string v8, "%s:%s%s%s"

    const/4 v9, 0x4

    new-array v9, v9, [Ljava/lang/Object;

    aput-object v1, v9, v10

    aput-object v3, v9, v11

    const/4 v10, 0x2

    aput-object v6, v9, v10

    const/4 v10, 0x3

    aput-object v4, v9, v10

    invoke-static {v8, v9}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v0

    .line 375
    .local v0, format:Ljava/lang/String;
    invoke-static {v0, p1, p2}, Landroid/text/format/DateFormat;->format(Ljava/lang/CharSequence;J)Ljava/lang/CharSequence;

    move-result-object v8

    check-cast v8, Ljava/lang/String;

    return-object v8

    .line 364
    .end local v0           #format:Ljava/lang/String;
    :cond_0
    const-string v1, "hh"

    .line 365
    const-string v4, "aa"

    goto :goto_0

    .line 371
    :cond_1
    const-string v6, ""

    goto :goto_1
.end method

.method public static getAppIcon(Landroid/content/Context;I)Landroid/graphics/drawable/Drawable;
    .locals 8
    .parameter "c"
    .parameter "uid"

    .prologue
    .line 164
    invoke-virtual {p0}, Landroid/content/Context;->getPackageManager()Landroid/content/pm/PackageManager;

    move-result-object v4

    .line 165
    .local v4, pm:Landroid/content/pm/PackageManager;
    invoke-virtual {p0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v5

    const v6, 0x7f020035

    invoke-virtual {v5, v6}, Landroid/content/res/Resources;->getDrawable(I)Landroid/graphics/drawable/Drawable;

    move-result-object v0

    .line 166
    .local v0, appIcon:Landroid/graphics/drawable/Drawable;
    invoke-virtual {v4, p1}, Landroid/content/pm/PackageManager;->getPackagesForUid(I)[Ljava/lang/String;

    move-result-object v3

    .line 168
    .local v3, packages:[Ljava/lang/String;
    if-eqz v3, :cond_0

    .line 171
    const/4 v5, 0x0

    :try_start_0
    aget-object v5, v3, v5

    const/4 v6, 0x0

    invoke-virtual {v4, v5, v6}, Landroid/content/pm/PackageManager;->getApplicationInfo(Ljava/lang/String;I)Landroid/content/pm/ApplicationInfo;

    move-result-object v1

    .line 172
    .local v1, appInfo:Landroid/content/pm/ApplicationInfo;
    invoke-virtual {v4, v1}, Landroid/content/pm/PackageManager;->getApplicationIcon(Landroid/content/pm/ApplicationInfo;)Landroid/graphics/drawable/Drawable;
    :try_end_0
    .catch Landroid/content/pm/PackageManager$NameNotFoundException; {:try_start_0 .. :try_end_0} :catch_0

    move-result-object v0

    .line 181
    .end local v1           #appInfo:Landroid/content/pm/ApplicationInfo;
    :goto_0
    return-object v0

    .line 173
    :catch_0
    move-exception v2

    .line 174
    .local v2, e:Landroid/content/pm/PackageManager$NameNotFoundException;
    const-string v5, "Su.Util"

    new-instance v6, Ljava/lang/StringBuilder;

    const-string v7, "No package found matching with the uid "

    invoke-direct {v6, v7}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v6, p1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v6

    invoke-virtual {v6}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v6

    invoke-static {v5, v6}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I

    goto :goto_0

    .line 178
    .end local v2           #e:Landroid/content/pm/PackageManager$NameNotFoundException;
    :cond_0
    const-string v5, "Su.Util"

    new-instance v6, Ljava/lang/StringBuilder;

    const-string v7, "Package not found for uid "

    invoke-direct {v6, v7}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v6, p1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v6

    invoke-virtual {v6}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v6

    invoke-static {v5, v6}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I

    goto :goto_0
.end method

.method public static getAppName(Landroid/content/Context;IZ)Ljava/lang/String;
    .locals 8
    .parameter "c"
    .parameter "uid"
    .parameter "withUid"

    .prologue
    const/4 v7, 0x1

    .line 99
    sget-object v5, Lcom/noshufou/android/su/util/Util;->sSystemUids:Ljava/util/HashMap;

    invoke-static {p1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v6

    invoke-virtual {v5, v6}, Ljava/util/HashMap;->containsKey(Ljava/lang/Object;)Z

    move-result v5

    if-eqz v5, :cond_0

    .line 100
    sget-object v5, Lcom/noshufou/android/su/util/Util;->sSystemUids:Ljava/util/HashMap;

    invoke-static {p1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v6

    invoke-virtual {v5, v6}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v5

    check-cast v5, Ljava/lang/String;

    .line 132
    :goto_0
    return-object v5

    .line 103
    :cond_0
    invoke-virtual {p0}, Landroid/content/Context;->getPackageManager()Landroid/content/pm/PackageManager;

    move-result-object v4

    .line 104
    .local v4, pm:Landroid/content/pm/PackageManager;
    const-string v0, "Unknown"

    .line 105
    .local v0, appName:Ljava/lang/String;
    invoke-virtual {v4, p1}, Landroid/content/pm/PackageManager;->getPackagesForUid(I)[Ljava/lang/String;

    move-result-object v3

    .line 107
    .local v3, packages:[Ljava/lang/String;
    if-eqz v3, :cond_5

    .line 109
    :try_start_0
    array-length v5, v3

    if-ne v5, v7, :cond_3

    .line 110
    const/4 v5, 0x0

    aget-object v5, v3, v5

    const/4 v6, 0x0

    invoke-virtual {v4, v5, v6}, Landroid/content/pm/PackageManager;->getApplicationInfo(Ljava/lang/String;I)Landroid/content/pm/ApplicationInfo;

    move-result-object v5

    invoke-virtual {v4, v5}, Landroid/content/pm/PackageManager;->getApplicationLabel(Landroid/content/pm/ApplicationInfo;)Ljava/lang/CharSequence;

    move-result-object v5

    .line 111
    invoke-interface {v5}, Ljava/lang/CharSequence;->toString()Ljava/lang/String;
    :try_end_0
    .catch Landroid/content/pm/PackageManager$NameNotFoundException; {:try_start_0 .. :try_end_0} :catch_0

    move-result-object v0

    .line 128
    :cond_1
    :goto_1
    if-eqz p2, :cond_2

    .line 129
    new-instance v5, Ljava/lang/StringBuilder;

    invoke-static {v0}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v6

    invoke-direct {v5, v6}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v6, " ("

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {v5, p1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v5

    const-string v6, ")"

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    :cond_2
    move-object v5, v0

    .line 132
    goto :goto_0

    .line 112
    :cond_3
    :try_start_1
    array-length v5, v3

    if-le v5, v7, :cond_1

    .line 113
    const-string v0, ""

    .line 114
    const/4 v2, 0x0

    .local v2, i:I
    :goto_2
    array-length v5, v3

    if-ge v2, v5, :cond_1

    .line 115
    new-instance v5, Ljava/lang/StringBuilder;

    invoke-static {v0}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v6

    invoke-direct {v5, v6}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    aget-object v6, v3, v2

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    .line 116
    array-length v5, v3

    add-int/lit8 v5, v5, -0x1

    if-ge v2, v5, :cond_4

    .line 117
    new-instance v5, Ljava/lang/StringBuilder;

    invoke-static {v0}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v6

    invoke-direct {v5, v6}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v6, ", "

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
    :try_end_1
    .catch Landroid/content/pm/PackageManager$NameNotFoundException; {:try_start_1 .. :try_end_1} :catch_0

    move-result-object v0

    .line 114
    :cond_4
    add-int/lit8 v2, v2, 0x1

    goto :goto_2

    .line 121
    .end local v2           #i:I
    :catch_0
    move-exception v1

    .line 122
    .local v1, e:Landroid/content/pm/PackageManager$NameNotFoundException;
    const-string v5, "Su.Util"

    const-string v6, "Package name not found"

    invoke-static {v5, v6, v1}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I

    goto :goto_1

    .line 125
    .end local v1           #e:Landroid/content/pm/PackageManager$NameNotFoundException;
    :cond_5
    const-string v5, "Su.Util"

    new-instance v6, Ljava/lang/StringBuilder;

    const-string v7, "Package not found for uid "

    invoke-direct {v6, v7}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v6, p1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v6

    invoke-virtual {v6}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v6

    invoke-static {v5, v6}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I

    goto :goto_1
.end method

.method public static getAppPackage(Landroid/content/Context;I)Ljava/lang/String;
    .locals 7
    .parameter "c"
    .parameter "uid"

    .prologue
    const/4 v6, 0x1

    .line 136
    sget-object v4, Lcom/noshufou/android/su/util/Util;->sSystemUids:Ljava/util/HashMap;

    invoke-static {p1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v5

    invoke-virtual {v4, v5}, Ljava/util/HashMap;->containsKey(Ljava/lang/Object;)Z

    move-result v4

    if-eqz v4, :cond_0

    .line 137
    sget-object v4, Lcom/noshufou/android/su/util/Util;->sSystemUids:Ljava/util/HashMap;

    invoke-static {p1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v5

    invoke-virtual {v4, v5}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v4

    check-cast v4, Ljava/lang/String;

    .line 160
    :goto_0
    return-object v4

    .line 140
    :cond_0
    invoke-virtual {p0}, Landroid/content/Context;->getPackageManager()Landroid/content/pm/PackageManager;

    move-result-object v3

    .line 141
    .local v3, pm:Landroid/content/pm/PackageManager;
    invoke-virtual {v3, p1}, Landroid/content/pm/PackageManager;->getPackagesForUid(I)[Ljava/lang/String;

    move-result-object v2

    .line 142
    .local v2, packages:[Ljava/lang/String;
    const-string v0, "unknown"

    .line 144
    .local v0, appPackage:Ljava/lang/String;
    if-eqz v2, :cond_4

    .line 145
    array-length v4, v2

    if-ne v4, v6, :cond_2

    .line 146
    const/4 v4, 0x0

    aget-object v0, v2, v4

    :cond_1
    :goto_1
    move-object v4, v0

    .line 160
    goto :goto_0

    .line 147
    :cond_2
    array-length v4, v2

    if-le v4, v6, :cond_1

    .line 148
    const-string v0, ""

    .line 149
    const/4 v1, 0x0

    .local v1, i:I
    :goto_2
    array-length v4, v2

    if-ge v1, v4, :cond_1

    .line 150
    new-instance v4, Ljava/lang/StringBuilder;

    invoke-static {v0}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v5

    invoke-direct {v4, v5}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    aget-object v5, v2, v1

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    .line 151
    array-length v4, v2

    add-int/lit8 v4, v4, -0x1

    if-ge v1, v4, :cond_3

    .line 152
    new-instance v4, Ljava/lang/StringBuilder;

    invoke-static {v0}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v5

    invoke-direct {v4, v5}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v5, ", "

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    .line 149
    :cond_3
    add-int/lit8 v1, v1, 0x1

    goto :goto_2

    .line 157
    .end local v1           #i:I
    :cond_4
    const-string v4, "Su.Util"

    const-string v5, "Package not found"

    invoke-static {v4, v5}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I

    goto :goto_1
.end method

.method public static getHash(Ljava/lang/String;)Ljava/lang/String;
    .locals 6
    .parameter "pin"

    .prologue
    .line 417
    :try_start_0
    const-string v4, "SHA-1"

    invoke-static {v4}, Ljava/security/MessageDigest;->getInstance(Ljava/lang/String;)Ljava/security/MessageDigest;
    :try_end_0
    .catch Ljava/security/NoSuchAlgorithmException; {:try_start_0 .. :try_end_0} :catch_0

    move-result-object v1

    .line 422
    .local v1, digest:Ljava/security/MessageDigest;
    invoke-virtual {v1}, Ljava/security/MessageDigest;->reset()V

    .line 424
    :try_start_1
    const-string v4, "UTF-8"

    invoke-virtual {p0, v4}, Ljava/lang/String;->getBytes(Ljava/lang/String;)[B

    move-result-object v4

    invoke-virtual {v1, v4}, Ljava/security/MessageDigest;->digest([B)[B

    move-result-object v3

    .line 425
    .local v3, input:[B
    invoke-static {v3}, Lcom/noshufou/android/su/util/Base64;->encode([B)Ljava/lang/String;
    :try_end_1
    .catch Ljava/io/UnsupportedEncodingException; {:try_start_1 .. :try_end_1} :catch_1

    move-result-object v0

    .local v0, base64:Ljava/lang/String;
    move-object p0, v0

    .line 429
    .end local v0           #base64:Ljava/lang/String;
    .end local v1           #digest:Ljava/security/MessageDigest;
    .end local v3           #input:[B
    .end local p0
    :goto_0
    return-object p0

    .line 418
    .restart local p0
    :catch_0
    move-exception v2

    .line 419
    .local v2, e:Ljava/security/NoSuchAlgorithmException;
    const-string v4, "Utils"

    const-string v5, "NoSuchAlgorithm, storing in plain text..."

    invoke-static {v4, v5, v2}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I

    goto :goto_0

    .line 427
    .end local v2           #e:Ljava/security/NoSuchAlgorithmException;
    .restart local v1       #digest:Ljava/security/MessageDigest;
    :catch_1
    move-exception v2

    .line 428
    .local v2, e:Ljava/io/UnsupportedEncodingException;
    const-string v4, "Utils"

    const-string v5, "UnsupportedEncoding, storing in plain text..."

    invoke-static {v4, v5, v2}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I

    goto :goto_0
.end method

.method public static getStatusIconDrawable(Landroid/content/Context;I)Landroid/graphics/drawable/Drawable;
    .locals 8
    .parameter "context"
    .parameter "allow"

    .prologue
    const/4 v7, 0x1

    const/4 v6, 0x2

    .line 185
    new-array v2, v6, [[I

    const/4 v4, 0x0

    .line 186
    new-array v5, v6, [I

    fill-array-data v5, :array_0

    aput-object v5, v2, v4

    .line 187
    new-array v4, v6, [I

    fill-array-data v4, :array_1

    aput-object v4, v2, v7

    .line 190
    .local v2, statusButtons:[[I
    invoke-static {p0}, Landroid/preference/PreferenceManager;->getDefaultSharedPreferences(Landroid/content/Context;)Landroid/content/SharedPreferences;

    move-result-object v4

    .line 191
    const-string v5, "pref_status_icon_type"

    const-string v6, "emote"

    invoke-interface {v4, v5, v6}, Landroid/content/SharedPreferences;->getString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v1

    .line 192
    .local v1, iconTypeString:Ljava/lang/String;
    const/4 v3, 0x1

    .line 193
    .local v3, statusIconType:I
    const-string v4, "dot"

    invoke-virtual {v1, v4}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v4

    if-eqz v4, :cond_2

    .line 194
    const/4 v3, 0x0

    .line 199
    :cond_0
    :goto_0
    if-ltz p1, :cond_1

    if-le p1, v7, :cond_3

    .line 200
    :cond_1
    const-string v4, "Su.Util"

    new-instance v5, Ljava/lang/StringBuilder;

    const-string v6, "Bad value given to getStatusButtonDrawable(int). Expecting 0 or 1, got "

    invoke-direct {v5, v6}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v5, p1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v5

    invoke-static {v4, v5}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I

    .line 201
    const/4 v0, 0x0

    .line 205
    :goto_1
    return-object v0

    .line 195
    :cond_2
    const-string v4, "emote"

    invoke-virtual {v1, v4}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v4

    if-eqz v4, :cond_0

    .line 196
    const/4 v3, 0x1

    goto :goto_0

    .line 204
    :cond_3
    invoke-virtual {p0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v4

    aget-object v5, v2, v3

    aget v5, v5, p1

    invoke-virtual {v4, v5}, Landroid/content/res/Resources;->getDrawable(I)Landroid/graphics/drawable/Drawable;

    move-result-object v0

    .line 205
    .local v0, drawable:Landroid/graphics/drawable/Drawable;
    goto :goto_1

    .line 186
    :array_0
    .array-data 0x4
        0x2ft 0x0t 0x2t 0x7ft
        0x2dt 0x0t 0x2t 0x7ft
    .end array-data

    .line 187
    :array_1
    .array-data 0x4
        0x30t 0x0t 0x2t 0x7ft
        0x2et 0x0t 0x2t 0x7ft
    .end array-data
.end method

.method public static getSuVersion()Ljava/lang/String;
    .locals 10

    .prologue
    const/4 v6, 0x0

    .line 240
    const/4 v5, 0x0

    .line 241
    .local v5, process:Ljava/lang/Process;
    const/4 v2, 0x0

    .line 244
    .local v2, inLine:Ljava/lang/String;
    :try_start_0
    invoke-static {}, Ljava/lang/Runtime;->getRuntime()Ljava/lang/Runtime;

    move-result-object v7

    const-string v8, "sh"

    invoke-virtual {v7, v8}, Ljava/lang/Runtime;->exec(Ljava/lang/String;)Ljava/lang/Process;

    move-result-object v5

    .line 245
    new-instance v4, Ljava/io/DataOutputStream;

    invoke-virtual {v5}, Ljava/lang/Process;->getOutputStream()Ljava/io/OutputStream;

    move-result-object v7

    invoke-direct {v4, v7}, Ljava/io/DataOutputStream;-><init>(Ljava/io/OutputStream;)V

    .line 246
    .local v4, os:Ljava/io/DataOutputStream;
    new-instance v3, Ljava/io/BufferedReader;

    new-instance v7, Ljava/io/InputStreamReader;

    .line 247
    new-instance v8, Ljava/io/DataInputStream;

    invoke-virtual {v5}, Ljava/lang/Process;->getInputStream()Ljava/io/InputStream;

    move-result-object v9

    invoke-direct {v8, v9}, Ljava/io/DataInputStream;-><init>(Ljava/io/InputStream;)V

    invoke-direct {v7, v8}, Ljava/io/InputStreamReader;-><init>(Ljava/io/InputStream;)V

    const/16 v8, 0x40

    .line 246
    invoke-direct {v3, v7, v8}, Ljava/io/BufferedReader;-><init>(Ljava/io/Reader;I)V

    .line 248
    .local v3, is:Ljava/io/BufferedReader;
    const-string v7, "su -v\n"

    invoke-virtual {v4, v7}, Ljava/io/DataOutputStream;->writeBytes(Ljava/lang/String;)V

    .line 254
    const/4 v1, 0x0

    .local v1, i:I
    :goto_0
    const/16 v7, 0x190

    if-lt v1, v7, :cond_3

    .line 264
    :cond_0
    invoke-virtual {v3}, Ljava/io/BufferedReader;->ready()Z

    move-result v7

    if-eqz v7, :cond_4

    .line 265
    invoke-virtual {v3}, Ljava/io/BufferedReader;->readLine()Ljava/lang/String;
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0
    .catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_1

    move-result-object v2

    .line 266
    if-eqz v2, :cond_5

    .line 276
    if-eqz v5, :cond_1

    .line 277
    invoke-virtual {v5}, Ljava/lang/Process;->destroy()V

    :cond_1
    move-object v6, v2

    .line 281
    .end local v1           #i:I
    .end local v3           #is:Ljava/io/BufferedReader;
    .end local v4           #os:Ljava/io/DataOutputStream;
    :cond_2
    :goto_1
    return-object v6

    .line 255
    .restart local v1       #i:I
    .restart local v3       #is:Ljava/io/BufferedReader;
    .restart local v4       #os:Ljava/io/DataOutputStream;
    :cond_3
    :try_start_1
    invoke-virtual {v3}, Ljava/io/BufferedReader;->ready()Z
    :try_end_1
    .catchall {:try_start_1 .. :try_end_1} :catchall_0
    .catch Ljava/io/IOException; {:try_start_1 .. :try_end_1} :catch_1

    move-result v7

    if-nez v7, :cond_0

    .line 259
    const-wide/16 v7, 0x5

    :try_start_2
    invoke-static {v7, v8}, Ljava/lang/Thread;->sleep(J)V
    :try_end_2
    .catchall {:try_start_2 .. :try_end_2} :catchall_0
    .catch Ljava/lang/InterruptedException; {:try_start_2 .. :try_end_2} :catch_0
    .catch Ljava/io/IOException; {:try_start_2 .. :try_end_2} :catch_1

    .line 254
    :goto_2
    add-int/lit8 v1, v1, 0x1

    goto :goto_0

    .line 260
    :catch_0
    move-exception v0

    .line 261
    .local v0, e:Ljava/lang/InterruptedException;
    :try_start_3
    const-string v7, "Su.Util"

    const-string v8, "Sleep timer got interrupted..."

    invoke-static {v7, v8}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I
    :try_end_3
    .catchall {:try_start_3 .. :try_end_3} :catchall_0
    .catch Ljava/io/IOException; {:try_start_3 .. :try_end_3} :catch_1

    goto :goto_2

    .line 272
    .end local v0           #e:Ljava/lang/InterruptedException;
    .end local v1           #i:I
    .end local v3           #is:Ljava/io/BufferedReader;
    .end local v4           #os:Ljava/io/DataOutputStream;
    :catch_1
    move-exception v0

    .line 273
    .local v0, e:Ljava/io/IOException;
    :try_start_4
    const-string v7, "Su.Util"

    const-string v8, "Problems reading current version."

    invoke-static {v7, v8, v0}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
    :try_end_4
    .catchall {:try_start_4 .. :try_end_4} :catchall_0

    .line 276
    if-eqz v5, :cond_2

    .line 277
    invoke-virtual {v5}, Ljava/lang/Process;->destroy()V

    goto :goto_1

    .line 270
    .end local v0           #e:Ljava/io/IOException;
    .restart local v1       #i:I
    .restart local v3       #is:Ljava/io/BufferedReader;
    .restart local v4       #os:Ljava/io/DataOutputStream;
    :cond_4
    :try_start_5
    const-string v7, "exit\n"

    invoke-virtual {v4, v7}, Ljava/io/DataOutputStream;->writeBytes(Ljava/lang/String;)V
    :try_end_5
    .catchall {:try_start_5 .. :try_end_5} :catchall_0
    .catch Ljava/io/IOException; {:try_start_5 .. :try_end_5} :catch_1

    .line 276
    :cond_5
    if-eqz v5, :cond_2

    .line 277
    invoke-virtual {v5}, Ljava/lang/Process;->destroy()V

    goto :goto_1

    .line 275
    .end local v1           #i:I
    .end local v3           #is:Ljava/io/BufferedReader;
    .end local v4           #os:Ljava/io/DataOutputStream;
    :catchall_0
    move-exception v6

    .line 276
    if-eqz v5, :cond_6

    .line 277
    invoke-virtual {v5}, Ljava/lang/Process;->destroy()V

    .line 279
    :cond_6
    throw v6
.end method

.method public static getSuVersionCode()I
    .locals 10

    .prologue
    const/4 v6, 0x0

    .line 285
    const/4 v5, 0x0

    .line 286
    .local v5, process:Ljava/lang/Process;
    const/4 v2, 0x0

    .line 289
    .local v2, inLine:Ljava/lang/String;
    :try_start_0
    invoke-static {}, Ljava/lang/Runtime;->getRuntime()Ljava/lang/Runtime;

    move-result-object v7

    const-string v8, "sh"

    invoke-virtual {v7, v8}, Ljava/lang/Runtime;->exec(Ljava/lang/String;)Ljava/lang/Process;

    move-result-object v5

    .line 290
    new-instance v4, Ljava/io/DataOutputStream;

    invoke-virtual {v5}, Ljava/lang/Process;->getOutputStream()Ljava/io/OutputStream;

    move-result-object v7

    invoke-direct {v4, v7}, Ljava/io/DataOutputStream;-><init>(Ljava/io/OutputStream;)V

    .line 291
    .local v4, os:Ljava/io/DataOutputStream;
    new-instance v3, Ljava/io/BufferedReader;

    new-instance v7, Ljava/io/InputStreamReader;

    .line 292
    new-instance v8, Ljava/io/DataInputStream;

    invoke-virtual {v5}, Ljava/lang/Process;->getInputStream()Ljava/io/InputStream;

    move-result-object v9

    invoke-direct {v8, v9}, Ljava/io/DataInputStream;-><init>(Ljava/io/InputStream;)V

    invoke-direct {v7, v8}, Ljava/io/InputStreamReader;-><init>(Ljava/io/InputStream;)V

    const/16 v8, 0x40

    .line 291
    invoke-direct {v3, v7, v8}, Ljava/io/BufferedReader;-><init>(Ljava/io/Reader;I)V

    .line 293
    .local v3, is:Ljava/io/BufferedReader;
    const-string v7, "su -v\n"

    invoke-virtual {v4, v7}, Ljava/io/DataOutputStream;->writeBytes(Ljava/lang/String;)V

    .line 299
    const/4 v1, 0x0

    .local v1, i:I
    :goto_0
    const/16 v7, 0x190

    if-lt v1, v7, :cond_2

    .line 309
    :cond_0
    invoke-virtual {v3}, Ljava/io/BufferedReader;->ready()Z

    move-result v7

    if-eqz v7, :cond_4

    .line 310
    invoke-virtual {v3}, Ljava/io/BufferedReader;->readLine()Ljava/lang/String;

    move-result-object v2

    .line 311
    if-eqz v2, :cond_3

    const/4 v7, 0x0

    const/4 v8, 0x1

    invoke-virtual {v2, v7, v8}, Ljava/lang/String;->substring(II)Ljava/lang/String;

    move-result-object v7

    invoke-static {v7}, Ljava/lang/Integer;->parseInt(Ljava/lang/String;)I

    move-result v7

    const/4 v8, 0x2

    if-le v7, v8, :cond_3

    .line 312
    const/4 v2, 0x0

    .line 313
    const-string v7, "su -V\n"

    invoke-virtual {v4, v7}, Ljava/io/DataOutputStream;->writeBytes(Ljava/lang/String;)V

    .line 314
    invoke-virtual {v3}, Ljava/io/BufferedReader;->readLine()Ljava/lang/String;

    move-result-object v2

    .line 315
    if-eqz v2, :cond_5

    .line 316
    invoke-static {v2}, Ljava/lang/Integer;->parseInt(Ljava/lang/String;)I
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0
    .catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_1

    move-result v6

    .line 328
    if-eqz v5, :cond_1

    .line 329
    invoke-virtual {v5}, Ljava/lang/Process;->destroy()V

    .line 332
    .end local v1           #i:I
    .end local v3           #is:Ljava/io/BufferedReader;
    .end local v4           #os:Ljava/io/DataOutputStream;
    :cond_1
    :goto_1
    return v6

    .line 300
    .restart local v1       #i:I
    .restart local v3       #is:Ljava/io/BufferedReader;
    .restart local v4       #os:Ljava/io/DataOutputStream;
    :cond_2
    :try_start_1
    invoke-virtual {v3}, Ljava/io/BufferedReader;->ready()Z
    :try_end_1
    .catchall {:try_start_1 .. :try_end_1} :catchall_0
    .catch Ljava/io/IOException; {:try_start_1 .. :try_end_1} :catch_1

    move-result v7

    if-nez v7, :cond_0

    .line 304
    const-wide/16 v7, 0x5

    :try_start_2
    invoke-static {v7, v8}, Ljava/lang/Thread;->sleep(J)V
    :try_end_2
    .catchall {:try_start_2 .. :try_end_2} :catchall_0
    .catch Ljava/lang/InterruptedException; {:try_start_2 .. :try_end_2} :catch_0
    .catch Ljava/io/IOException; {:try_start_2 .. :try_end_2} :catch_1

    .line 299
    :goto_2
    add-int/lit8 v1, v1, 0x1

    goto :goto_0

    .line 305
    :catch_0
    move-exception v0

    .line 306
    .local v0, e:Ljava/lang/InterruptedException;
    :try_start_3
    const-string v7, "Su.Util"

    const-string v8, "Sleep timer got interrupted..."

    invoke-static {v7, v8}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I
    :try_end_3
    .catchall {:try_start_3 .. :try_end_3} :catchall_0
    .catch Ljava/io/IOException; {:try_start_3 .. :try_end_3} :catch_1

    goto :goto_2

    .line 324
    .end local v0           #e:Ljava/lang/InterruptedException;
    .end local v1           #i:I
    .end local v3           #is:Ljava/io/BufferedReader;
    .end local v4           #os:Ljava/io/DataOutputStream;
    :catch_1
    move-exception v0

    .line 325
    .local v0, e:Ljava/io/IOException;
    :try_start_4
    const-string v7, "Su.Util"

    const-string v8, "Problems reading current version."

    invoke-static {v7, v8, v0}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
    :try_end_4
    .catchall {:try_start_4 .. :try_end_4} :catchall_0

    .line 328
    if-eqz v5, :cond_1

    .line 329
    invoke-virtual {v5}, Ljava/lang/Process;->destroy()V

    goto :goto_1

    .line 328
    .end local v0           #e:Ljava/io/IOException;
    .restart local v1       #i:I
    .restart local v3       #is:Ljava/io/BufferedReader;
    .restart local v4       #os:Ljava/io/DataOutputStream;
    :cond_3
    if-eqz v5, :cond_1

    .line 329
    invoke-virtual {v5}, Ljava/lang/Process;->destroy()V

    goto :goto_1

    .line 322
    :cond_4
    :try_start_5
    const-string v7, "exit\n"

    invoke-virtual {v4, v7}, Ljava/io/DataOutputStream;->writeBytes(Ljava/lang/String;)V
    :try_end_5
    .catchall {:try_start_5 .. :try_end_5} :catchall_0
    .catch Ljava/io/IOException; {:try_start_5 .. :try_end_5} :catch_1

    .line 328
    :cond_5
    if-eqz v5, :cond_1

    .line 329
    invoke-virtual {v5}, Ljava/lang/Process;->destroy()V

    goto :goto_1

    .line 327
    .end local v1           #i:I
    .end local v3           #is:Ljava/io/BufferedReader;
    .end local v4           #os:Ljava/io/DataOutputStream;
    :catchall_0
    move-exception v6

    .line 328
    if-eqz v5, :cond_6

    .line 329
    invoke-virtual {v5}, Ljava/lang/Process;->destroy()V

    .line 331
    :cond_6
    throw v6
.end method

.method public static getUidName(Landroid/content/Context;IZ)Ljava/lang/String;
    .locals 4
    .parameter "c"
    .parameter "uid"
    .parameter "withUid"

    .prologue
    .line 209
    invoke-virtual {p0}, Landroid/content/Context;->getPackageManager()Landroid/content/pm/PackageManager;

    move-result-object v0

    .line 210
    .local v0, pm:Landroid/content/pm/PackageManager;
    const-string v1, ""

    .line 211
    .local v1, uidName:Ljava/lang/String;
    if-nez p1, :cond_1

    .line 212
    const-string v1, "root"

    .line 217
    :goto_0
    if-eqz p2, :cond_0

    .line 218
    new-instance v2, Ljava/lang/StringBuilder;

    invoke-static {v1}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v3

    invoke-direct {v2, v3}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v3, " ("

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2, p1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v2

    const-string v3, ")"

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    .line 221
    :cond_0
    return-object v1

    .line 214
    :cond_1
    invoke-virtual {v0, p1}, Landroid/content/pm/PackageManager;->getNameForUid(I)Ljava/lang/String;

    goto :goto_0
.end method

.method public static goHome(Landroid/content/Context;)V
    .locals 5
    .parameter "context"

    .prologue
    .line 226
    invoke-static {p0}, Landroid/preference/PreferenceManager;->getDefaultSharedPreferences(Landroid/content/Context;)Landroid/content/SharedPreferences;

    move-result-object v1

    .line 228
    .local v1, prefs:Landroid/content/SharedPreferences;
    const-string v2, "pref_ghost_mode"

    const/4 v3, 0x0

    invoke-interface {v1, v2, v3}, Landroid/content/SharedPreferences;->getBoolean(Ljava/lang/String;Z)Z

    move-result v2

    if-eqz v2, :cond_0

    .line 229
    new-instance v0, Landroid/content/Intent;

    const-class v2, Lcom/noshufou/android/su/HomeActivity;

    invoke-direct {v0, p0, v2}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    .line 235
    .local v0, intent:Landroid/content/Intent;
    :goto_0
    const/high16 v2, 0x400

    invoke-virtual {v0, v2}, Landroid/content/Intent;->setFlags(I)Landroid/content/Intent;

    .line 236
    invoke-virtual {p0, v0}, Landroid/content/Context;->startActivity(Landroid/content/Intent;)V

    .line 237
    return-void

    .line 231
    .end local v0           #intent:Landroid/content/Intent;
    :cond_0
    new-instance v0, Landroid/content/Intent;

    invoke-direct {v0}, Landroid/content/Intent;-><init>()V

    .line 232
    .restart local v0       #intent:Landroid/content/Intent;
    new-instance v2, Landroid/content/ComponentName;

    const-string v3, "com.noshufou.android.su"

    .line 233
    const-string v4, "com.noshufou.android.su.Su"

    invoke-direct {v2, v3, v4}, Landroid/content/ComponentName;-><init>(Ljava/lang/String;Ljava/lang/String;)V

    .line 232
    invoke-virtual {v0, v2}, Landroid/content/Intent;->setComponent(Landroid/content/ComponentName;)Landroid/content/Intent;

    goto :goto_0
.end method

.method public static isPackageMalicious(Landroid/content/Context;Landroid/content/pm/PackageInfo;)I
    .locals 11
    .parameter "context"
    .parameter "packageInfo"

    .prologue
    const/4 v10, 0x2

    const/4 v4, 0x1

    const/4 v3, 0x0

    .line 464
    iget-object v5, p1, Landroid/content/pm/PackageInfo;->packageName:Ljava/lang/String;

    invoke-virtual {p0}, Landroid/content/Context;->getPackageName()Ljava/lang/String;

    move-result-object v6

    invoke-virtual {v5, v6}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v5

    if-eqz v5, :cond_1

    .line 492
    :cond_0
    :goto_0
    return v3

    .line 470
    :cond_1
    iget-object v5, p1, Landroid/content/pm/PackageInfo;->applicationInfo:Landroid/content/pm/ApplicationInfo;

    iget v5, v5, Landroid/content/pm/ApplicationInfo;->uid:I

    invoke-virtual {p0}, Landroid/content/Context;->getApplicationInfo()Landroid/content/pm/ApplicationInfo;

    move-result-object v6

    iget v6, v6, Landroid/content/pm/ApplicationInfo;->uid:I

    if-ne v5, v6, :cond_2

    move v3, v4

    .line 471
    goto :goto_0

    .line 475
    :cond_2
    iget-object v5, p1, Landroid/content/pm/PackageInfo;->requestedPermissions:[Ljava/lang/String;

    if-eqz v5, :cond_0

    .line 476
    new-array v0, v10, [Ljava/lang/String;

    .line 477
    const-string v5, "com.noshufou.android.su.RESPOND"

    aput-object v5, v0, v3

    .line 478
    const-string v5, "com.noshufou.android.su.provider.WRITE"

    aput-object v5, v0, v4

    .line 480
    .local v0, bannedPermissions:[Ljava/lang/String;
    iget-object v5, p1, Landroid/content/pm/PackageInfo;->requestedPermissions:[Ljava/lang/String;

    array-length v6, v5

    move v4, v3

    :goto_1
    if-ge v4, v6, :cond_0

    aget-object v2, v5, v4

    .line 481
    .local v2, s:Ljava/lang/String;
    const/4 v1, 0x0

    .local v1, i:I
    :goto_2
    if-lt v1, v10, :cond_3

    .line 480
    add-int/lit8 v4, v4, 0x1

    goto :goto_1

    .line 482
    :cond_3
    aget-object v7, v0, v1

    invoke-virtual {v2, v7}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v7

    if-eqz v7, :cond_4

    .line 483
    invoke-virtual {p0}, Landroid/content/Context;->getPackageManager()Landroid/content/pm/PackageManager;

    move-result-object v7

    .line 484
    aget-object v8, v0, v1

    iget-object v9, p1, Landroid/content/pm/PackageInfo;->packageName:Ljava/lang/String;

    invoke-virtual {v7, v8, v9}, Landroid/content/pm/PackageManager;->checkPermission(Ljava/lang/String;Ljava/lang/String;)I

    move-result v7

    .line 483
    if-nez v7, :cond_4

    .line 486
    add-int/lit8 v3, v1, 0x2

    goto :goto_0

    .line 481
    :cond_4
    add-int/lit8 v1, v1, 0x1

    goto :goto_2
.end method

.method public static isSuCurrent()Z
    .locals 2

    .prologue
    .line 336
    invoke-static {}, Lcom/noshufou/android/su/util/Util;->getSuVersionCode()I

    move-result v0

    const/16 v1, 0xa

    if-ge v0, v1, :cond_0

    .line 337
    const/4 v0, 0x0

    .line 339
    :goto_0
    return v0

    :cond_0
    const/4 v0, 0x1

    goto :goto_0
.end method

.method public static launchPreferences(Landroid/content/Context;)V
    .locals 2
    .parameter "context"

    .prologue
    .line 408
    new-instance v0, Landroid/content/Intent;

    const-class v1, Lcom/noshufou/android/su/preferences/PreferencesActivity;

    invoke-direct {v0, p0, v1}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    invoke-virtual {p0, v0}, Landroid/content/Context;->startActivity(Landroid/content/Intent;)V

    .line 412
    return-void
.end method

.method public static showOutdatedNotification(Landroid/content/Context;)V
    .locals 8
    .parameter "context"

    .prologue
    const/4 v7, 0x0

    .line 496
    invoke-static {p0}, Landroid/preference/PreferenceManager;->getDefaultSharedPreferences(Landroid/content/Context;)Landroid/content/SharedPreferences;

    move-result-object v3

    .line 497
    const-string v4, "pref_outdated_notification"

    const/4 v5, 0x1

    invoke-interface {v3, v4, v5}, Landroid/content/SharedPreferences;->getBoolean(Ljava/lang/String;Z)Z

    move-result v3

    if-eqz v3, :cond_0

    .line 499
    const-string v3, "notification"

    invoke-virtual {p0, v3}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Landroid/app/NotificationManager;

    .line 500
    .local v1, nm:Landroid/app/NotificationManager;
    new-instance v2, Landroid/app/Notification;

    const v3, 0x7f020034

    .line 501
    const v4, 0x7f0b00b0

    invoke-virtual {p0, v4}, Landroid/content/Context;->getString(I)Ljava/lang/String;

    move-result-object v4

    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v5

    .line 500
    invoke-direct {v2, v3, v4, v5, v6}, Landroid/app/Notification;-><init>(ILjava/lang/CharSequence;J)V

    .line 503
    .local v2, notification:Landroid/app/Notification;
    new-instance v3, Landroid/content/Intent;

    const-class v4, Lcom/noshufou/android/su/UpdaterActivity;

    invoke-direct {v3, p0, v4}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    .line 502
    invoke-static {p0, v7, v3, v7}, Landroid/app/PendingIntent;->getActivity(Landroid/content/Context;ILandroid/content/Intent;I)Landroid/app/PendingIntent;

    move-result-object v0

    .line 504
    .local v0, contentIntent:Landroid/app/PendingIntent;
    const v3, 0x7f0b00b1

    invoke-virtual {p0, v3}, Landroid/content/Context;->getString(I)Ljava/lang/String;

    move-result-object v3

    .line 505
    const v4, 0x7f0b00b2

    invoke-virtual {p0, v4}, Landroid/content/Context;->getString(I)Ljava/lang/String;

    move-result-object v4

    .line 504
    invoke-virtual {v2, p0, v3, v4, v0}, Landroid/app/Notification;->setLatestEventInfo(Landroid/content/Context;Ljava/lang/CharSequence;Ljava/lang/CharSequence;Landroid/app/PendingIntent;)V

    .line 506
    iget v3, v2, Landroid/app/Notification;->flags:I

    or-int/lit8 v3, v3, 0x10

    iput v3, v2, Landroid/app/Notification;->flags:I

    .line 507
    const/16 v3, 0x2a

    invoke-virtual {v1, v3, v2}, Landroid/app/NotificationManager;->notify(ILandroid/app/Notification;)V

    .line 509
    .end local v0           #contentIntent:Landroid/app/PendingIntent;
    .end local v1           #nm:Landroid/app/NotificationManager;
    .end local v2           #notification:Landroid/app/Notification;
    :cond_0
    return-void
.end method

.method public static toggleAppIcon(Landroid/content/Context;Z)V
    .locals 4
    .parameter "context"
    .parameter "newState"

    .prologue
    const/4 v2, 0x1

    .line 440
    new-instance v0, Landroid/content/ComponentName;

    const-string v1, "com.noshufou.android.su"

    .line 441
    const-string v3, "com.noshufou.android.su.Su"

    .line 440
    invoke-direct {v0, v1, v3}, Landroid/content/ComponentName;-><init>(Ljava/lang/String;Ljava/lang/String;)V

    .line 442
    .local v0, componentName:Landroid/content/ComponentName;
    invoke-virtual {p0}, Landroid/content/Context;->getPackageManager()Landroid/content/pm/PackageManager;

    move-result-object v3

    .line 443
    if-eqz p1, :cond_0

    move v1, v2

    .line 442
    :goto_0
    invoke-virtual {v3, v0, v1, v2}, Landroid/content/pm/PackageManager;->setComponentEnabledSetting(Landroid/content/ComponentName;II)V

    .line 446
    return-void

    .line 444
    :cond_0
    const/4 v1, 0x2

    goto :goto_0
.end method

.method public static updatePermissionsDb(Landroid/content/Context;)V
    .locals 4
    .parameter "context"

    .prologue
    .line 512
    invoke-static {p0}, Landroid/preference/PreferenceManager;->getDefaultSharedPreferences(Landroid/content/Context;)Landroid/content/SharedPreferences;

    move-result-object v1

    invoke-interface {v1}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor;

    move-result-object v1

    .line 513
    const-string v2, "permissions_dirty"

    const/4 v3, 0x1

    invoke-interface {v1, v2, v3}, Landroid/content/SharedPreferences$Editor;->putBoolean(Ljava/lang/String;Z)Landroid/content/SharedPreferences$Editor;

    move-result-object v1

    invoke-interface {v1}, Landroid/content/SharedPreferences$Editor;->commit()Z

    .line 514
    const-string v1, "Su.Util"

    const-string v2, "Start PermissionsDbService"

    invoke-static {v1, v2}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 515
    new-instance v0, Landroid/content/Intent;

    const-class v1, Lcom/noshufou/android/su/service/PermissionsDbService;

    invoke-direct {v0, p0, v1}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    .line 516
    .local v0, intent:Landroid/content/Intent;
    invoke-virtual {p0, v0}, Landroid/content/Context;->startService(Landroid/content/Intent;)Landroid/content/ComponentName;

    .line 517
    return-void
.end method
